package org.example.design.abstractFactory.itf.impl;

import org.example.design.abstractFactory.RedisUtils;
import org.example.design.abstractFactory.itf.ICacheAdapter;

import java.util.concurrent.TimeUnit;

/**
 * @Classname NormolCacheAdapter
 * @Description TODO
 * @Date 2020/10/30 5:26 下午
 * @Created by xiangjd
 */
public class NormolCacheAdapter implements ICacheAdapter {
    private RedisUtils redisUtils = new RedisUtils();

    @Override
    public String get(String key) {
        return redisUtils.get(key);
    }

    @Override
    public void set(String key, String value) {
        redisUtils.set(key, value);

    }

    @Override
    public void set(String key, String value, long timeout, TimeUnit timeUnit) {
        redisUtils.set(key, value, timeout, timeUnit);

    }

    @Override
    public void del(String key) {
        redisUtils.del(key);
    }
}
